chore: resolve staticcheck/lint findings - #608
Open
rc4 wants to merge 7 commits into
Open
Conversation
- drop duplicate encoding/hex import alias enchex - replace deprecated io/ioutil import with io - migrate deprecated go-ntlmssp ProcessChallenge/ProcessChallengeWithHash/GetDomain to NewAuthenticateMessage - cleanup switch syntax
- simplify pkt.Identifier.Tag to pkt.Tag via embedded promotion - make ControlServerSideSortingResult receiver names consistent - fix doc comment form on some types - cleanup switch syntax
- ldap.go: replace deprecated io/ioutil with os.ReadFile; tidy up switch statement syntax
- search.go: use any in lieu of interface{}, reflect.Ptr -> reflect.Pointer, tidy up doc comment
- debug.go: use any in lieu of interface{}
- gssapi/client.go: drop redundant embedded Client selector
- examples_test.go: replace deprecated io/ioutil with os.ReadFile - search_test.go: use range syntax instaed of manual loop - error_test.go: rename panic_data to panicData per ST1003, drop redundant tt copy (no longer needed since go1.22)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While reading through the codebase to learn more about the library my editor automatically linted the project and came back with these findings - these seemed like they would be helpful fixes.
io/ioutilwith appropriateio/osfunctionsinterface{}toany,reflect.PtrtoPointerProcessChallenge/ProcessChallengeWithHashtoNewAuthenticateMessage(see relevant docs for go-ntlmssp)Again, hope this is helpful - please let me know if there's anything I need to fix/do/undo. :)
(Also - I'd be happy to throw together a golangci-lint config to help catch stuff like this easily in the future - if it'd be helpful.)